<!--
  @author duanzuocai
  @since 2018/10/23 15:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<div class="layui-fluid">

    <div class="layui-card">

        <div class="layui-card-body">

            <!--表单样式统一为layui-form(必需样式)，lay-filter属性统一定义为zmn-form-->
            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

                <input type="hidden" name="id" th:value="${returnVisitContent.id}"/>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">回访内容：</label>
                    <div class="layui-input-inline" style="width: 430px">
                        <textarea lay-verify="required" placeholder="最多50字" maxlength="50" th:text="${returnVisitContent.content}" id="content" name="content"
                                  class="layui-textarea"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">排序ID：</label>
                    <div class="layui-input-inline" style="width:200px;">
                        <input type="number" name="sort" autocomplete="off" class="layui-input" th:value="${returnVisitContent.sort}"
                               lay-verify="required|sort"  onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')">
                    </div>
                    <div class="layui-input-inline" style="width:160px;">
                        <label class="layui-form-mid" style="color: #9F9F9F;">数字越小，在越前面</label>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">服务平台：</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="showPlat" value="10" title="啄木鸟"
                               th:checked="${returnVisitContent.plat != null && returnVisitContent.plat.indexOf('10') != -1}">
                        <input type="checkbox" name="showPlat" value="20" title="言而有信"
                               th:checked="${returnVisitContent.plat != null && returnVisitContent.plat.indexOf('20') != -1}">
                        <input type="checkbox" name="showPlat" value="40" title="川南环保"
                               th:checked="${returnVisitContent.plat != null && returnVisitContent.plat.indexOf('40') != -1}">
                        <input type="checkbox" name="showPlat" value="30" title="一步维修"
                               th:checked="${returnVisitContent.plat != null && returnVisitContent.plat.indexOf('30') != -1}">
                    </div>
                </div>

                <!--按钮栏
                    置于form标签内的最下方，
                    主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
                    -->
                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button onclick="parent.layui.element.tabDelete('layadmin-layout-tabs', window.location.pathname + window.location.search)" class="layui-btn layui-btn-primary" id="cancel">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        orderconfig_returnvisitcontent_edit:  "orderconfig/returnvisit/content/zmn.orderconfig.returnvisitcontent.edit",
    }).use(['index', 'orderconfig_returnvisitcontent_edit']);

</script>